﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TimeAxis.Models;

namespace TimeAxis.Interfaces
{
    public interface IUsers
    {
        #region 默认接口

        /// <summary>
        /// 得到所有 用户表在大项目中尽量少用，这个方法返回的数据量过于庞大
        /// </summary>
        /// <returns>所有用户表</returns>
        List<Users> GetList();

        /// <summary>
        /// 分页显示用户表
        /// </summary>
        /// <param name="PageSize">每页记录数</param>
        /// <param name="NowPage">当前页</param>
        /// <param name="PageCount">总共多少页</param>
        /// <param name="recordCount">总记录数</param>
        /// <returns>查询到的记录</returns>
        List<Users> GetListByPage(int PageSize, int NowPage, out int PageCount, out int recordCount);

        /// <summary>
        /// 分页模糊查询用户表
        /// </summary>
        /// <param name="users">对象实体</param>
        /// <param name="PageSize">每页记录数</param>
        /// <param name="NowPage">当前页</param>
        /// <param name="PageCount">总共多少页</param>
        /// <param name="recordCount">总记录数</param>
        /// <returns>查询到的记录</returns>
        List<Users> GetListByPageLikeKey(Users users, int PageSize, int NowPage, out int PageCount, out int recordCount);

        /// <summary>
        /// 分页查询用户表
        /// </summary>
        /// <param name="users">对象实体</param>
        /// <param name="PageSize">每页记录数</param>
        /// <param name="NowPage">当前页</param>
        /// <param name="PageCount">总共多少页</param>
        /// <param name="recordCount">总记录数</param>
        /// <returns>查询到的记录</returns>
        List<Users> GetListByPageAndKeys(Users users, int PageSize, int NowPage, out int PageCount, out int recordCount);

        /// <summary>
        /// 得到一个用户表
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns>对象</returns>
        Users GetModel(int id);

        /// <summary>
        /// 保存一个用户表
        /// </summary>
        /// <param name="users">对象实体</param>
        /// <returns>编号</returns>
        int Insert(Users users);

        /// <summary>
        /// 按关键字查询头几条
        /// </summary>
        /// <param name="count">数量</param>
        /// <returns>用户表的列表</returns>
        List<Users> GetTopList(int count);

        /// <summary>
        /// 判断用户表是否唯一存在
        /// </summary>
        /// <param name="users">对象实体</param>
        /// <returns>是否存在</returns>
        bool IsExist(Users users);

        /// <summary>
        /// 判断用户表是否存在
        /// </summary>
        /// <param name="users">对象实体</param>
        /// <returns>是否存在</returns>
        bool IsJustExist(Users users);

        /// <summary>
        /// 得到关键字等于。。。的所有用户表
        /// </summary>
        /// <param name="users">对象实体</param>
        /// <returns>用户表的List</returns>
        List<Users> GetSomeObject(Users users);

        /// <summary>
        /// 编辑一个用户表
        /// </summary>
        /// <param name="users">对象实体</param>
        void Edit(Users users);

        /// <summary>
        /// 删除一个用户表
        /// </summary>
        /// <param name="users">对象实体</param>
        void Delete(Users users);

        /// <summary>
        /// 删除所有用户表
        /// </summary>
        void DeleteAll();

        /// <summary>
        /// 按关键字删除
        /// </summary>
        /// <param name="users">对象实体</param>
        void DeleteColumByKey_Value(Users users);

        #endregion

        #region 自定义接口

        Users Login(string username, string password);

        #endregion

    }
}
